home *** CD-ROM | disk | FTP | other *** search
- on handlebugs
- global sblist, animtimer, phasetime, idealnum, sndopen, mybugsound, captivechannel, grabcur, reachcur
- animateall()
- startTimer()
- set animtimer to 5
- set phasetime to the timer
- set during to the timer + 360
- set lastadd to the timer
- repeat while not (the mouseDown)
- if count(sblist) > 10 then
- if (random(30 - count(sblist)) = 1) or (count(sblist) > 18) then
- settask(getAt(sblist, random(count(sblist))), #frighten)
- end if
- end if
- if ((the timer - phasetime) > 8) and (count(sblist) > 5) then
- settask(getAt(sblist, random(count(sblist))), #frighten)
- set idealnum to count(sblist) - 1
- if idealnum < 5 then
- set idealnum to 5
- end if
- end if
- set phasetime to the timer
- repeat while the timer < animtimer
- updateStage()
- end repeat
- animateall()
- set animtimer to the timer + 3
- if (the timer - lastadd) > 60 then
- addbug()
- set lastadd to the timer
- set animtimer to 5
- end if
- updateStage()
- end repeat
- if rollOver(47) and the mouseDown then
- go(the frame)
- exit
- end if
- set mycur to point(the mouseH, the mouseV)
- set gotabug to 0
- repeat with xxx = 1 to count(sblist)
- set sbnum to getPropAt(sblist, xxx)
- set rectaman to rect(the left of sprite sbnum, the top of sprite sbnum, the right of sprite sbnum, the bottom of sprite sbnum)
- if inside(mycur, rectaman) then
- catchbug(sbnum, getAt(sblist, xxx))
- set gotabug to 1
- exit repeat
- end if
- end repeat
- if gotabug > 0 then
- cursor([grabcur, grabcur + 1])
- repeat while the mouseDown
- if the timer > animtimer then
- animateall()
- set animtimer to the timer + 3
- end if
- if the timer > 60 then
- addbug()
- startTimer()
- set animtimer to 5
- end if
- updateStage()
- end repeat
- sound stop 2
- releasebug()
- if captivechannel > 0 then
- if sprite captivechannel intersects 3 then
- InTheCagePal()
- end if
- end if
- cursor([reachcur, reachcur + 1])
- end if
- go(the frame)
- end
-